<template>
  <div>
    <vue-office-docx
        :src="doxUrl"
        style="height: 100vh;"
        @rendered="rendered"
    />
  </div>
</template>

<script setup>
import VueOfficeDocx from '@vue-office/docx'
import '@vue-office/docx/lib/index.css'
import {onMounted, defineProps, ref} from "vue"
const props = defineProps({
  wordUrl: {
    type: String,
    required: true
  }
})
const doxUrl = ref(props.wordUrl)
const rendered = () => {
  console.log("渲染完成")
}
onMounted(() => {
  rendered()
})
</script>

<style lang="scss" scoped>
.docx-wrapper {
  background: #ffffff;
  padding: 0;
}
</style>
